home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / oops / r3canvas.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  8.3 KB  |  292 lines

  1.  
  2. // JavaScript wrapper for r3canvas.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_CANVAS_H = 1;
  7. include("oops/r3widget.js")
  8. include("oops/r3color.js")
  9.  
  10.  
  11. var R3CLID_CANVAS = 264;
  12.  
  13.  
  14.  
  15.  
  16. // Description: Ask canvas to create new drawing context. Multiple threads can render to a single
  17. //      window through drawing contexes. Drawing context specifies all rendering attributes, such as current color etc.
  18. // Virtual method
  19. // Returns: Object, address of the created drawing context.
  20.  
  21. R3CM_NEWDRAWCONTEXT = 264000;
  22.  
  23. function mR3CM_NEWDRAWCONTEXT() {
  24.   return R3ToJS(  DoA(this.r3obj, 264000, 0, R3TID_INTEGER, 0));
  25. }
  26.  
  27. // Description: Ask canvas to delete given drawing context.
  28. // Virtual method
  29. // Returns: Boolean, FALSE if drawing context wasn't created by the canvas
  30. // p3: Object, drawing context
  31.  
  32. R3CM_DELETEDRAWCONTEXT = 264001;
  33.  
  34. function mR3CM_DELETEDRAWCONTEXT(p3) {
  35.   return   DoA(this.r3obj, 264001, p3, R3TID_OBJECT, 0);
  36. }
  37.  
  38. // Description: Duplicate given draw context
  39. // Virtual method
  40. // Returns: Object, newly created draw context
  41. // p3: Object, draw context to be duplicated
  42.  
  43. R3CM_COPYDRAWCONTEXT = 264002;
  44.  
  45. function mR3CM_COPYDRAWCONTEXT(p3) {
  46.   return R3ToJS(  DoA(this.r3obj, 264002, p3, R3TID_OBJECT, 0));
  47. }
  48.  
  49. // Description: Ask canvas to restore the contents of the damaged window.
  50. // Virtual method
  51. // Returns: Boolean, FALSE if failed
  52.  
  53. R3CM__WAS__RESTOREFROMBACKUP = 264003;
  54.  
  55. function mR3CM__WAS__RESTOREFROMBACKUP() {
  56.   return   DoA(this.r3obj, 264003, 0, R3TID_INTEGER, 0);
  57. }
  58.  
  59. // Description: Class method which can be used for registering new canvas classes. The canvas class
  60. //      keeps track of all available canvas classes and ENUMCANVASLIST can be used for learning what
  61. //      classes are available.
  62. // Returns: Boolean, FALSE if no more canvases cannot be registered
  63. // p1: String, name of the canvas
  64. // p2: Integer, class id of the canvas class
  65. // p3: Tag[], currently unused
  66.  
  67. R3CCM_REGISTERCANVAS = 264004;
  68.  
  69. function mR3CCM_REGISTERCANVAS(p1, p2, p3) {
  70.   return   Do3(this.r3obj, 264004, p1, R3TID_STRING, 0, p2, R3TID_INTEGER, 0, p3, R3TID_TAG, R3TNF_ARRAY);
  71. }
  72.  
  73. // Description: Enumerate available canvas classes. Calls given object with given method as R3SendMsgA3(R3OBJ *userobj, R3INT
  74. //      usermth, char *class_name, R3INT classid, void *user_data);
  75. // Returns: Integer, return value from the callback object
  76. // p1: Object, object to be called
  77. // p2: Integer, method to be called
  78. // p3: Object, whatever user specific data
  79.  
  80. R3CCM_ENUMCANVASLIST = 264005;
  81.  
  82. function mR3CCM_ENUMCANVASLIST(p1, p2, p3) {
  83.   return   DoA3(this.r3obj, 264005, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  84. }
  85.  
  86. // Description: window moves on screen
  87.  
  88. R3CM_SCREENPOSITIONCHANGED = 264006;
  89.  
  90. function mR3CM_SCREENPOSITIONCHANGED() {
  91.   DoA(this.r3obj, 264006, 0, R3TID_INTEGER, 0);
  92. }
  93.  
  94. // Description: window is activated
  95.  
  96. R3CM_ACTIVATE = 264007;
  97.  
  98. function mR3CM_ACTIVATE() {
  99.   DoA(this.r3obj, 264007, 0, R3TID_INTEGER, 0);
  100. }
  101.  
  102. // Description: Palette of the window has changed
  103.  
  104. R3CM_PALETTECHANGED = 264008;
  105.  
  106. function mR3CM_PALETTECHANGED() {
  107.   DoA(this.r3obj, 264008, 0, R3TID_INTEGER, 0);
  108. }
  109.  
  110. // Description: get an index for RGB color value.
  111. // Returns: Integer, index
  112. // p3: r3Vect4, RGB color
  113.  
  114. R3CM_GETINDEXFORCOLOR = 264009;
  115.  
  116. function mR3CM_GETINDEXFORCOLOR(p3) {
  117.   return   DoA(this.r3obj, 264009, p3, R3TID_COLOR_RGBA, 0);
  118. }
  119.  
  120. // Description: Make the given dc the master dc. One of the    * drawports is the master
  121. //      port, which take care    * of swapbuffers etc.
  122. // Returns: Integer, index
  123.  
  124. R3CM_SETMASTER = 264010;
  125.  
  126. function mR3CM_SETMASTER() {
  127.   return   DoA(this.r3obj, 264010, 0, R3TID_INTEGER, 0);
  128. }
  129.  
  130.  
  131.  
  132.  
  133. R3CA_DoubleBuffer = 264500;
  134. function SetR3CA_DoubleBuffer(value) {
  135.   R3Set(this.r3obj, R3CA_DoubleBuffer, value, R3TID_BOOLEAN, 0); 
  136. }
  137.  
  138. R3CA_Main = 264501;
  139. function SetR3CA_Main(value) {
  140.   R3Set(this.r3obj, R3CA_Main, value, R3TID_BOOLEAN, 0); 
  141. }
  142.  
  143. R3CA_Overlays = 264502;
  144. function SetR3CA_Overlays(value) {
  145.   R3Set(this.r3obj, R3CA_Overlays, value, R3TID_BOOLEAN, 0); 
  146. }
  147.  
  148. R3CA_DoubleBufferOverlays = 264503;
  149. function SetR3CA_DoubleBufferOverlays(value) {
  150.   R3Set(this.r3obj, R3CA_DoubleBufferOverlays, value, R3TID_BOOLEAN, 0); 
  151. }
  152.  
  153. R3CA_BackDrop = 264504;
  154. function SetR3CA_BackDrop(value) {
  155.   R3Set(this.r3obj, R3CA_BackDrop, value, R3TID_BOOLEAN, 0); 
  156. }
  157.  
  158. R3CA_BackDropImage = 264505;
  159. function SetR3CA_BackDropImage(value) {
  160.   R3Set(this.r3obj, R3CA_BackDropImage, value, R3TID_BOOLEAN, 0); 
  161. }
  162.  
  163. R3CA_Shaded = 264506;
  164. function SetR3CA_Shaded(value) {
  165.   R3Set(this.r3obj, R3CA_Shaded, value, R3TID_INTEGER, 0); 
  166. }
  167.  
  168. function GetR3CA_Shaded() {
  169.   return R3Get(this.r3obj, R3CA_Shaded, R3TID_INTEGER, 0); 
  170. }
  171.  
  172. R3CA_Backup = 264507;
  173. function SetR3CA_Backup(value) {
  174.   R3Set(this.r3obj, R3CA_Backup, value, R3TID_BOOLEAN, 0); 
  175. }
  176.  
  177. R3CA_TrueColor = 264508;
  178. function SetR3CA_TrueColor(value) {
  179.   R3Set(this.r3obj, R3CA_TrueColor, value, R3TID_BOOLEAN, 0); 
  180. }
  181.  
  182. function GetR3CA_TrueColor() {
  183.   return R3Get(this.r3obj, R3CA_TrueColor, R3TID_BOOLEAN, 0); 
  184. }
  185.  
  186. R3CA_Palette = 264509;
  187. function GetR3CA_Palette() {
  188.   return R3ToJS(R3Get(this.r3obj, R3CA_Palette, R3TID_OBJECT, 0)); 
  189. }
  190.  
  191. R3CA_ClipLeft = 264510;
  192. function SetR3CA_ClipLeft(value) {
  193.   R3Set(this.r3obj, R3CA_ClipLeft, value, R3TID_INTEGER, 0); 
  194. }
  195.  
  196. function GetR3CA_ClipLeft() {
  197.   return R3Get(this.r3obj, R3CA_ClipLeft, R3TID_INTEGER, 0); 
  198. }
  199.  
  200. R3CA_ClipRight = 264511;
  201. function SetR3CA_ClipRight(value) {
  202.   R3Set(this.r3obj, R3CA_ClipRight, value, R3TID_INTEGER, 0); 
  203. }
  204.  
  205. function GetR3CA_ClipRight() {
  206.   return R3Get(this.r3obj, R3CA_ClipRight, R3TID_INTEGER, 0); 
  207. }
  208.  
  209. R3CA_ClipTop = 264512;
  210. function SetR3CA_ClipTop(value) {
  211.   R3Set(this.r3obj, R3CA_ClipTop, value, R3TID_INTEGER, 0); 
  212. }
  213.  
  214. function GetR3CA_ClipTop() {
  215.   return R3Get(this.r3obj, R3CA_ClipTop, R3TID_INTEGER, 0); 
  216. }
  217.  
  218. R3CA_ClipBottom = 264513;
  219. function SetR3CA_ClipBottom(value) {
  220.   R3Set(this.r3obj, R3CA_ClipBottom, value, R3TID_INTEGER, 0); 
  221. }
  222.  
  223. function GetR3CA_ClipBottom() {
  224.   return R3Get(this.r3obj, R3CA_ClipBottom, R3TID_INTEGER, 0); 
  225. }
  226.  
  227. R3CA_DrawContextClass = 264514;
  228. function SetR3CA_DrawContextClass(value) {
  229.   R3Set(this.r3obj, R3CA_DrawContextClass, value, R3TID_INTEGER, 0); 
  230. }
  231.  
  232. R3CA_Semaphore = 264515;
  233. function SetR3CA_Semaphore(value) {
  234.   R3Set(this.r3obj, R3CA_Semaphore, value, R3TID_OBJECT, 0); 
  235. }
  236.  
  237. R3CA_Depth = 264517;
  238. function SetR3CA_Depth(value) {
  239.   R3Set(this.r3obj, R3CA_Depth, value, R3TID_INTEGER, 0); 
  240. }
  241.  
  242. var R3CCA_DefaultBackgroundColorRGB = 264518; // r3Vect4[]
  243. var R3GM_TRUECOLOR = 0;
  244. var R3GM_PALETTE = 1;
  245.  
  246.  
  247. function r3Canvas () { 
  248.    this.base = r3God;
  249.    if(arguments.length) {
  250.       this.base(R3CLID_CANVAS, arguments);
  251.    }
  252.    // Methods
  253.    this.NEWDRAWCONTEXT=mR3CM_NEWDRAWCONTEXT;
  254.    this.DELETEDRAWCONTEXT=mR3CM_DELETEDRAWCONTEXT;
  255.    this.COPYDRAWCONTEXT=mR3CM_COPYDRAWCONTEXT;
  256.    this._WAS__RESTOREFROMBACKUP=mR3CM__WAS__RESTOREFROMBACKUP;
  257.    this.REGISTERCANVAS=mR3CCM_REGISTERCANVAS;
  258.    this.ENUMCANVASLIST=mR3CCM_ENUMCANVASLIST;
  259.    this.SCREENPOSITIONCHANGED=mR3CM_SCREENPOSITIONCHANGED;
  260.    this.ACTIVATE=mR3CM_ACTIVATE;
  261.    this.PALETTECHANGED=mR3CM_PALETTECHANGED;
  262.    this.GETINDEXFORCOLOR=mR3CM_GETINDEXFORCOLOR;
  263.    this.SETMASTER=mR3CM_SETMASTER;
  264.  
  265.    // Attributes
  266.    this.SetDoubleBuffer=SetR3CA_DoubleBuffer;
  267.    this.SetMain=SetR3CA_Main;
  268.    this.SetOverlays=SetR3CA_Overlays;
  269.    this.SetDoubleBufferOverlays=SetR3CA_DoubleBufferOverlays;
  270.    this.SetBackDrop=SetR3CA_BackDrop;
  271.    this.SetBackDropImage=SetR3CA_BackDropImage;
  272.    this.GetShaded=GetR3CA_Shaded;
  273.    this.SetShaded=SetR3CA_Shaded;
  274.    this.SetBackup=SetR3CA_Backup;
  275.    this.GetTrueColor=GetR3CA_TrueColor;
  276.    this.SetTrueColor=SetR3CA_TrueColor;
  277.    this.GetPalette=GetR3CA_Palette;
  278.    this.GetClipLeft=GetR3CA_ClipLeft;
  279.    this.SetClipLeft=SetR3CA_ClipLeft;
  280.    this.GetClipRight=GetR3CA_ClipRight;
  281.    this.SetClipRight=SetR3CA_ClipRight;
  282.    this.GetClipTop=GetR3CA_ClipTop;
  283.    this.SetClipTop=SetR3CA_ClipTop;
  284.    this.GetClipBottom=GetR3CA_ClipBottom;
  285.    this.SetClipBottom=SetR3CA_ClipBottom;
  286.    this.SetDrawContextClass=SetR3CA_DrawContextClass;
  287.    this.SetSemaphore=SetR3CA_Semaphore;
  288.    this.SetDepth=SetR3CA_Depth;
  289. }
  290.  
  291. r3Canvas.prototype=new r3Widget;
  292. // r3canvas.h_H